]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
workspaceThumbnail: forbid manipulations of removed workspaces
authorOwen W. Taylor <otaylor@fishsoup.net>
Mon, 14 Feb 2011 22:09:04 +0000 (17:09 -0500)
committerOwen W. Taylor <otaylor@fishsoup.net>
Sun, 20 Feb 2011 17:38:10 +0000 (12:38 -0500)
Don't allow dragging onto a removed workspace or activating it.

https://bugzilla.gnome.org/show_bug.cgi?id=642329

js/ui/workspaceThumbnail.js

index 6d44e23580f71e473bb2ca5a576a4653322cd932..ab9ea9091d1920f0603cf92e3984e5ff75a09f83 100644 (file)
@@ -328,6 +328,9 @@ WorkspaceThumbnail.prototype = {
     },
 
     _activate : function (clone, time) {
+        if (this.state > ThumbnailState.NORMAL)
+            return;
+
         // a click on the already current workspace should go back to the main view
         if (this.metaWorkspace == global.screen.get_active_workspace())
             Main.overview.hide();
@@ -337,6 +340,9 @@ WorkspaceThumbnail.prototype = {
 
     // Draggable target interface
     handleDragOver : function(source, actor, x, y, time) {
+        if (this.state > ThumbnailState.NORMAL)
+            return DND.DragMotionResult.CONTINUE;
+
         if (source.realWindow)
             return DND.DragMotionResult.MOVE_DROP;
         if (source.shellWorkspaceLaunch)
@@ -346,6 +352,9 @@ WorkspaceThumbnail.prototype = {
     },
 
     acceptDrop : function(source, actor, x, y, time) {
+        if (this.state > ThumbnailState.NORMAL)
+            return false;
+
         if (source.realWindow) {
             let win = source.realWindow;
             if (this._isMyWindow(win))